import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import '@/style/index.scss'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import installSvg from '@/icons/index'
import i18n from './i18n'

import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/lib/locale/lang/en'

// App.com
const app = createApp(App)
installSvg(app)
app.use(i18n)
app
  .use(store)
  .use(router)
  .use(ElementPlus, {
    locale: store.getters.language === 'zh' ? zhCn : en
  })
  .mount('#app')
